
/**
 * 注册
 */
function register(){
		var form = document.forms['registerForm'];
		if(form.email.value==""){
			alert("电子邮箱不能为空！");
		}else if(form.username.value==""){
			alert("用户名不能为空！");
		}else if(form.password.value==""){
			alert("密码不能为空！");
		}else if(form.rePassword.value==""){
			alert("确认密码不能为空！");
		}else if(form.validate.value==""){
			alert("请输入验证码！");
		}else{
			form.submit();
		}
	}

/**
 * 监听回车键
 */
document.onkeydown = function(event) {
	var form = document.forms['registerForm'];
	event = event ? event : window.event ;
    if(event.keyCode == 13) { 
    	if(form.email.value!="" 
    		&& form.username.value!=""
    		&& form.password.value!=""
    		&& form.rePassword.value!=""
    		&& form.validate.value!=""
    			){
    		register();
    	}
    } 
}; 

/**
 * 重新获取验证图片
 */
function reloadImage() {
	var verify=document.getElementById('image');
	    verify.setAttribute('src','/daycodefront/jpaas_jsp/image.jsp?it='+Math.random());
	 
}

